# -*- coding: utf-8 -*-
<%inherit file="../base.mako"/>

<%namespace name="student_comps" file="/students/components.mako"/>
<%namespace name="machine_comps" file="/machines/components.mako"/>

<h2>
Machine: ${c.machine.hostname|h} ${c.machine.macaddress|h}
</h2>

<h3>
User: ${student_comps.link_to(c.machine.user)}
</h3>

<h3>
IPs:
</h3>

<table>
  <tr>
    <th>From</th>
    <th>To</th>
    <th>IP</th>
  </tr>
%for ipassoc in c.machine.ipassociations:
  <tr>
      <td>
        ${ipassoc.from_date|h}
    </td>
    <td>
      ${ipassoc.to_date or u'Now'|h}
    </td>
    <td>
      ${ipassoc.ip.address|h}
    </td>
  </tr>
%endfor
</table>